﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Messages.aspx.cs" Inherits="HelfenHelfen.Web.Forms.Site.Messages"
    MasterPageFile="~/Site.Master" %>

<asp:Content ID="Content1" runat="server" ContentPlaceHolderID="MainContent">
    <asp:ListView runat="server" ID="MessageListView" 
        onitemcommand="MessageListView_ItemCommand" 
    onitemdeleting="MessageListView_ItemDeleting">
        <ItemTemplate>
            <div class="box">
                <h2>
                    <%# Eval("Sender.FirstName") + " " + Eval("Sender.LastName") %></h2>
                <p>
                    <strong>
                        <%# Eval("Title") %></strong></p>
                <p>
                    <%# Eval("Message") %></p>
                <asp:LinkButton Text="Löschen" CommandName="Delete" runat="server" />
        </ItemTemplate>
    </asp:ListView>
    <div id="NewMessageDialog" class="box">
        <h1>
            Neue Nachricht</h1>
        <p>
            <asp:Label AssociatedControlID="txtTitle" runat="server">Subjekt:</asp:Label>
            <asp:TextBox runat="server" ID="txtTitle" />
        </p>
        <p>
            <asp:Label AssociatedControlID="txtMessage" runat="server">Nachricht:</asp:Label>
            <asp:TextBox runat="server" ID="txtMessage" />
        </p>
        <p>
            <asp:Button Text="Absenden" runat="server" onclick="SendButton_Click" />
        </p>
    </div>
</asp:Content>
